import json

from library.tools.json_driver import JsonDriver
from jsonpath import jsonpath
from library.tools.file_tool.operationFileControl import read_yaml_to_dict
from library.tools.cache_driver import cacheClassDriver, cacheFileDriver

ss = {"name": "$(code)"}

dd = {
  "store": {
    "book": [
      {
        "category": "reference",
        "author": "Nigel Rees",
        "title": "Sayings of the Century",
        "price": 8.95
      },
      {
        "category": "fiction",
        "author": "Evelyn Waugh",
        "title": "Sword of Honour",
        "price": 12.99
      }
    ],
    "bicycle": {
      "color": "red",
      "price": 19.95
    }
  },
  "expensive": 10
}

print(jsonpath(dd, "$."))
JsonDriver.update_value_by_jsonpath(ss, '$.name', 555)
print(ss)
# print(jsonpath(ss, '$.[0].case_baidu_test_001.data'))

print(read_yaml_to_dict('body.yaml'))


